<extend name="Public:common" />
<!--/sidebar-->
<block name="content">
<style type="text/css">
    p{
    width:700px;
    /*height:100px;*/
    text-indent:2em;
    line-height:150%;
    margin:5px 0 0;
}
p a{
    color:#FDCD3D;
}
</style>
    <div class="main-wrap">
        <div class="crumb-wrap">
            <div class="crumb-list"> <i class="icon-font"></i>
                <a href="/Admin">首页</a>
                <span class="crumb-step">&gt;</span>
                <span class="crumb-name">网站设置</span>
            </div>
        </div>
        <div class="result-wrap">
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <!-- <th class="tc" width="5%"> -->
                                <!-- <input class="allChoose" name="" type="checkbox"></th> -->
                            <th>ID</th>
                            <th>名称</th>
                            <th>内容</th>
                            <th>状态</th>
                            <!-- <th>操作</th> -->
                        </tr>
                        <volist name="list" id="vo" offset="7" length='7' >
                         <tr>
                        <td><{$vo.id}></td>
                        <td><{$vo.name}></td>
                        <td>
                        <if condition="($vo.title eq '')"> 
                            <form action="__URL__/upload" enctype="multipart/form-data" method="post" >
                            <input type="file" name="photo" />
                            <input type="hidden" name="n" value="<{$vo.id}>">
                            <input type="submit" value="提交" >
                            </form>
                        <else /> 
                        <img width='168px' height="150px" src="/<{$vo.title}>" alt="">
                            <form action="__URL__/upload" enctype="multipart/form-data" method="post" >
                            <input type="hidden" name="n" value="<{$vo.id}>">
                                <input type="file" name="photo"/>
                                <input type="submit" value="修改" >
                            </form>
                        </if>
                            
                        </td>
                         <if condition="($vo.status eq 1)"> <td><a href="javascript:sta(<{$vo.id}>,0)" title="">开启</a></td>
                              <else /> <td><a href="javascript:sta(<{$vo.id}>,1)" title="">关闭</a></td>
                        </if>
<!--                         <td>
                            <a class="link-update" href="<{:U('Admin/Site/update/id/'.$vo['id'])}>">编辑</a>
                        </td> -->
                    </tr>
                </volist>
                        <volist name="list" id="vo" offset="0" length='7' >
                        <tr>
                            <!-- <td class="tc"> -->
                                <!-- <input name="id[]" value="58" type="checkbox"></td> -->
                        <td><{$vo.id}></td>
                        <td><{$vo.name}></td>
                        <td>
                            <input type="text" name="" placeholder="<{$vo.title}>" onblur="doblur(this,<{$vo['id']}>)" value="<{$vo.title}>">
                        </td>
                         <if condition="($vo.status eq 1)"> <td><a href="javascript:sta(<{$vo.id}>,0)" title="">开启</a></td>
                              <else /> <td><a href="javascript:sta(<{$vo.id}>,1)" title="">关闭</a></td>
                        </if>
<!--                         <td>
                            <a class="link-update" href="<{:U('Admin/Site/update/id/'.$vo['id'])}>">编辑</a>
                            <a class="link-del" href="javascript:del(<{$vo['id']}>)">删除</a>
                        </td> -->
                    </tr>
                    </volist>

                </table>
                <div class="list-page"><{$page}></div>
            </div>
    </div>
</div>
<script type="text/javascript">
            function del(id){
            //删除 商品 漂亮的提示信息
            $.MsgBox.Confirm("删除提示", "执行后将无法恢复，确定继续吗？温馨提示", function() { 
                //发送 当前商品的id 和当前用户帐号
                $.post("__URL__/delete",{'sid':id},function(data){
                     $.MsgBox.Alert("消息", data);
                    location.reload();
                });
            })
        }

 function doblur(s,id){
    var yh = $.trim($(s).val()); 
         $.MsgBox.Confirm("修改提示", "确定继续吗？温馨提示", function() { 
        $.post('__URL__/update', {type:id,val:yh}, function(data) {
            $.MsgBox.Alert("消息", data);
            location.reload();
            });
            })
        }


function sta(sid,sta){
     $.MsgBox.Confirm("修改提示1", "确定继续吗？温馨提示", function() { 
            $.post('__URL__/edit', {sid:sid,sta:sta}, function(data) {
                // alert(data);
                $.MsgBox.Alert("消息", data);
                location.reload();
                });
                })
        }
</script>






</block>